package com.baseLearn.learn.classLoader;

import java.util.ArrayList;
import java.util.HashMap;

public class TestClassLoader {

    public static void main(String[] arg) {

        ClassLoader c = TestClassLoader.class.getClassLoader();  //获取Test类的类加载器

        System.out.println(c);

        ClassLoader c1 = c.getParent();  //获取c这个类加载器的父类加载器

        System.out.println(c1);

        ClassLoader c2 = c1.getParent();//获取c1这个类加载器的父类加载器

        System.out.println(c2);

        HashMap<String, String> hashMap = new HashMap<>();
        String s = hashMap.putIfAbsent("test", "A");
        System.out.println(s);
        String s2 = hashMap.putIfAbsent("test", "A2");
        System.out.println(s2);

        ArrayList<String> strings = new ArrayList<>();


    }

}
